package com.idea.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 租箱类
 *
 * @author lajiaochaorou
 * ClassName ContainerDTO
 * @data 2022/12/2  9:59
 **/
@Data
public class ContainerDTO implements Serializable {

    private String id;

    /**
     * 箱型号和数量
     **/
    private String equipmentType;

    /**
     * 箱型总数
     **/
    private String equipmentQuantity;

    /**
     * 提箱地区
     **/
    private List<PickUpDTO> pickUpDTOS;

    /**
     * 提箱地区
     **/
    private List<LocationDTO> locations;

    /**
     * 右侧值列的最大列数
     */
    private int rightColSumCount;

    /**
     * 右侧值列的最大列数
     *
     * @return
     */
    public int getRightColSumCount() {
        if (locations != null) {
            rightColSumCount = locations.size() * 4;
        }
        return rightColSumCount;
    }

    /**
     * 获取每个箱型的提箱地点数量
     * @return
     */
    public int getPickupSize() {
        if (this.pickUpDTOS != null) {
            return this.pickUpDTOS.size();
        }
        return 0;
    }


}
